class GameBase {
  int timestamp = 0;
  int frame = 0;
  Graphics graphics;
  Renderer renderer;
  Audio audio;
  Input input;
  AssetBox assetBox;

  void _start() {
    timestamp = Clock.now();
    _world = new GameWorld();
    
    this.start({});
  }
  
  void _tick() {
    final now = Clock.now();
    final elapsedTime = now - timestamp;
    final dt = elapsedTime / Clock.frequency();
    
    this.update(dt);
    
    graphics.begin();
    this.draw(renderer);
    graphics.end();
    
    timestamp = now;
    frame++;
  }
  
  void start(Map options) { }
  void update(double dt)  { }
  void draw(Renderer g)   { }
}
